using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class forums_controls_administration_ChildForums : Controls.DataManagerForumControl
{
    protected override void ItemChanged()
    {
        gridChildren.DataSource = DAL.Forums.GetByParent(CurrentForum);
        gridChildren.DataBind();
    }

    protected void NewForumSelected(object sender, CommandEventArgs e)
    {
        long forumID = 0;
        if (Int64.TryParse(e.CommandArgument.ToString(), out forumID))
        {
            CurrentForum = DAL.Forums.Item(forumID);
        }
        else
        {
            CurrentForum = null;
        }

        RaiseForumSelected();
    }
}
